import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * game模块-房间信息
 */
@Entity('game_room_info')
export class GameRoomInfoEntity extends BaseEntity {
    @Index()
    @Column({ comment: '房间号', length: 50 })
    roomNumber: string;

    @Index()
    @Column({ comment: '房主id', length: 50 })
    ownerId: string;

    @Column({ comment: '房主是否准备 0:否 1:是', default: 1 })
    ownerReady: number;

    @Column({ comment: '成员id', nullable: true })
    memberId: string;

    @Column({ comment: '成员是否准备 0:否 1:是', default: 0 })
    memberReady: number;

    @Column({ comment: '房间状态 0:未开始 1:开始游戏 2:解散房间', default: 0 })
    status: number;

    @Column({ comment: '备注', nullable: true, length: 100 })
    remark: string;

}
